package cn.antblog.designTemp.wrapper.rice;

/**
 * @ClassName Demo
 * @Description 测试
 * @Author YangJingyi
 * @Date 2023/8/16 16:22
 * @Version 1.0
 */
public class Demo {
    public static void main(String[] args) {
        //点一份炒饭
        FastFood food = new FriedRice();
        //花费的价格
        System.out.println(food.getDesc() + " " + food.cost() + "元");
        System.out.println("========");
        //点一份加鸡蛋的炒饭
        FastFood food1 = new FriedRice();
        food1 = new Egg(food1);
        //花费的价格
        System.out.println(food1.getDesc() + " " + food1.cost() + "元");
//        System.out.println("========");
//        //点一份加培根的炒面
//        FastFood food2 = new FriedNoodles();
//        food2 = new Bacon(food2);
//        //花费的价格
//        System.out.println(food2.getDesc() + " " + food2.cost() + "元");
    }

}
